/*
 * SubRouteInfo.java
 * 
 * Copyright 2008 David D. Emory
 * 
 * This file is part of Five Points. See <http://www.fpdev.org> for
 * additional information regarding the project.
 * 
 * Five Points is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Five Points is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Five Points.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.fpdev.core.transit;

import org.fpdev.core.basenet.BNode;
import org.fpdev.core.basenet.*;

public class SubRouteInfo {

  private SubRoute sub_;
  private int dli_;
  private double dist_;
  private BNode accessNode_;

  public SubRouteInfo(SubRoute sub) {
    this(sub, -1, null);
  }

  public SubRouteInfo(SubRoute sub, int dli) {
    this(sub, dli, null);
  }

  public SubRouteInfo(SubRoute sub, BNode accessNode) {
    this(sub, -1, accessNode);
  }

  public SubRouteInfo(SubRoute sub, int dli, BNode accessNode) {
    sub_ = sub;
    dli_ = dli;
    accessNode_ = accessNode;
  }

  public SubRoute getSubRoute() {
    return sub_;
  }

  public int getDLI() {
    return dli_;
  }

  public void setAccessNode(BNode node) {
    accessNode_ = node;
  }

  public BNode getAccessNode() {
    return accessNode_;
  }

  public void setDistance(double dist) {
    dist_ = dist;
  }

  public double getDistance() {
    return dist_;
  }

  public SubRouteInfo clone() {
    SubRouteInfo sri = new SubRouteInfo(sub_, dli_, accessNode_);
    sri.dist_ = dist_;
    return sri;
  }
}
